﻿using com.susi.excel.importer;
using com.susi.util;
using Sirenix.OdinInspector;
using Sirenix.OdinInspector.Editor;
using Sirenix.Utilities;
using Sirenix.Utilities.Editor;
using UnityEditor;
using UnityEngine;

public class SusiBase64Editor : OdinEditorWindow {
    [MenuItem("Tools/Susi/SusiBase64Editor")]
    private static void Open()
    {
        var window = GetWindow<SusiBase64Editor>();
        window.position = GUIHelper.GetEditorWindowRect().AlignCenter(700, 700);
    }

    [Multiline][InlineButton(nameof(FromSB64),"转Str")]
    public string SusiBase64;
    [Multiline][InlineButton(nameof(ToSB64),"转SB64")]
    public string CommonString;

    void FromSB64()
    {
        CommonString = SusiBase64.FromSusiBase64();
    }

    void ToSB64()
    {
        SusiBase64 = CommonString.ToSusiBase64();
    }
}